package zzu.patterns.structural.proxy;

/**
 * 此种实现为静态代理，一旦接口类那边新增接口，我们就要改动接口类、目标类、代理类
 */
public class ISellHouseProxy implements ISell{
    private ISell target;
    ISellHouseProxy() {}
    ISellHouseProxy(ISell iSell) {
        this.target = iSell;
    }
    public void sell() {
        System.out.println("代理推荐房前准备");
        target.sell();
        System.out.println("代理推荐后");
    }

    public void eat() {
        System.out.println("饭前");
        target.eat();
        System.out.println("饭后");
    }

    public void watch() {

    }
}
